package com.linkhub.oms.admin.modules.pickuporder.service;

import com.linkhub.oms.admin.modules.pickuporder.domain.param.EntryOrderStateChangeParam;
import com.linkhub.oms.admin.modules.pickuporder.domain.param.MarkCompletionParam;
import com.linkhub.oms.admin.modules.pickuporder.domain.param.PickUpOrderQueryParam;
import com.linkhub.oms.admin.modules.pickuporder.domain.param.PickUpOrderSaveOrUpdateParam;
import com.linkhub.oms.admin.modules.pickuporder.domain.vo.EntryOrderLineImportResultVO;
import com.linkhub.oms.admin.modules.pickuporder.domain.vo.EntryOrderResultVO;
import com.linkhub.oms.admin.modules.pickuporder.domain.vo.PickUpOrderDetailVO;
import com.linkhub.oms.admin.modules.pickuporder.domain.vo.PickUpOrderVO;
import com.linkhub.oms.common.response.PageDTO;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * @Description: PickUpOrderBizService
 * @Author: echo
 * @Date: 2024/5/2 19:26
 * @Version: 1.0
 */
public interface PickUpOrderBizService {

    /**
     * 分页查询提货单列表
     *
     * @param orderQueryParam orderQueryParam
     * @return PickUpOrderVO
     */
    PageDTO<PickUpOrderVO> pageOrders(PickUpOrderQueryParam orderQueryParam);

    /**
     * 查询提货单详情信息
     *
     * @param sysEntryOrderCode sysEntryOrderCode
     * @param customerRole      customerRole
     * @return PickUpOrderDetailVO
     */
    PickUpOrderDetailVO getOrderDetail(String sysEntryOrderCode, boolean customerRole);

    /**
     * 新增提货申请单
     *
     * @param saveParam saveParam
     */
    void addPickUpOrder(PickUpOrderSaveOrUpdateParam saveParam);


    /**
     * 编辑提货申请单
     *
     * @param editParam editParam
     */
    void editPickUpOrder(PickUpOrderSaveOrUpdateParam editParam);

    /**
     * 获取提货结果
     *
     * @param sysEntryOrderCode sysEntryOrderCode
     * @return 提货结果
     */
    List<EntryOrderResultVO> getEntryOrderResult(String sysEntryOrderCode);

    /**
     * 取消提货
     *
     * @param sysEntryOrderCode sysEntryOrderCode
     */
    void cancel(String sysEntryOrderCode);

    /**
     * 变更提货状态
     *
     * @param stateChangeParam stateChangeParam
     */
    void changeState(EntryOrderStateChangeParam stateChangeParam);


    /**
     * 标记完成
     *
     * @param markCompletionParam markCompletionParam
     */
    void markComplete(MarkCompletionParam markCompletionParam);

    /**
     * 提货商品信息excel模板下载
     *
     * @param response response
     */
    void downloadEntryOrderLineTemplate(HttpServletResponse response);

    /**
     * 导入提货商品信息
     *
     * @param userId         userId
     * @param sysSupplierId  sysSupplierId
     * @param orderLineExcel orderLineExcel
     * @return orderLines
     */
    List<EntryOrderLineImportResultVO> importEntryOrderLines(String userId, String sysSupplierId,
                                                             MultipartFile orderLineExcel);

    /**
     * @Author XieYu
     * @Description 仓库入库回调
     * @Date 2024/7/19 21:20
     * @Param [sysEntryOrderCode, confirmType]
     * @return void
     */
    boolean wmsInbound(String sysEntryOrderCode, boolean allConfirm);
}
